//
//  JFWeakScriptMessageDelegate.m
//  JFBase
//
//  Created by Alan Wang on 2019/7/1.
//  Copyright © 2019 Alan Wang. All rights reserved.
//

#import "JFWeakScriptMessageDelegate.h"
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>

@implementation JFWeakScriptMessageDelegate

- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate{
    self = [super init];
    if (self) {
        _scriptDelegate = scriptDelegate;
    }
    return self;
}

- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message{
    [self.scriptDelegate userContentController:userContentController didReceiveScriptMessage:message];
}
@end
